<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:tools="http://schemas.android.com/tools"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:dist="http://schemas.android.com/apk/distribution">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
    <uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" />

    <dist:module dist:instant="true" />

    <application
        android:name=".application.App"
        android:allowBackup="true"
        android:dataExtractionRules="@xml/data_extraction_rules"
        android:fullBackupContent="@xml/backup_rules"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.App.Starting"
        tools:targetApi="s">

        <service
            android:name=".view.notification.PlaySoundService"
            android:enabled="true"
            android:exported="true" />
        <service
            android:name=".view.notification.NotificationService"
            android:enabled="true"
            android:exported="true" />

        <activity
            android:name=".view.DictionaryActivity"
            android:configChanges="screenSize|screenLayout|keyboardHidden"
            android:exported="false"
            android:screenOrientation="portrait"
            android:theme="@style/Theme.Translator" />
        <activity
            android:name=".view.root.RootActivity"
            android:configChanges="screenSize|screenLayout|keyboardHidden"
            android:exported="true"
            android:screenOrientation="portrait"
            android:theme="@style/Theme.App.Starting">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <receiver
            android:name=".view.widget.WidgetForDictionary"
            android:exported="true">
            <intent-filter>
                <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
            </intent-filter>

            <meta-data
                android:name="android.appwidget.provider"
                android:resource="@xml/widget_info" />
        </receiver>
        <meta-data android:name="com.google.ar.core" android:value="optional" tools:replace="android:value" />
    </application>
</manifest>